package com.ebraga.trackerclub.android.handler.api;

import com.ebraga.trackerclub.android.exception.handler.BackofficeHandlerException;
import com.ebraga.trackerclub.android.vo.UserVO;


public interface LoginHandler {
	
	
	/**
	 * Method responsible for update user on local database after successful loginOnline
	 * 
	 * @param userVO
	 */
	void loginOnline(UserVO userVO) throws BackofficeHandlerException;
	/**
	 * Method responsible for authorizing user from local database. Used if there is no network connection
	 * 
	 * @param userVO
	 */
	void loginOffline(UserVO userVO) throws BackofficeHandlerException;

	/**
	 * Method responsible for verifying the user's last login
	 * 
	 * @return
	 * @throws BackofficeHandlerException
	 */
	UserVO checkLastLogin() throws BackofficeHandlerException;	
	
	/**
	 * Method responsible for return the user's last login
	 * 
	 * @return
	 * @throws BackofficeHandlerException
	 */
	UserVO lastLogin() throws BackofficeHandlerException;		
	
}
